package com.xiaoge.typeconvert;

import com.xiaoge.service.OrderService;

import java.beans.PropertyEditor;
import java.beans.PropertyEditorSupport;

/**
 * TODO  spring 用的 jdk转换器
 *
 * @author <a href="mailto:1330137071@qq.com">Zhang Xiao</a>
 * @since
 */
public class StringToOrderPropertyEditor extends PropertyEditorSupport implements PropertyEditor {

	@Override
	public void setAsText(String text) throws IllegalArgumentException {
		OrderService orderService = new OrderService();
		orderService.setOrderName(text);
		this.setValue(orderService);
	}

}
